import { AddBlog } from '../constant'

const blog = []

function blogReducer(preState = blog, action) {
	const { type, data } = action

	switch (type) {
		case AddBlog:
			return [...data]
		default:
			return preState
	}
}

export default blogReducer
